Adding and Aligning Controls in an Absolute Layout Container

Description

The Absolute Layout Container allows you to use a 'what you see is what you get' type editor when adding and arranging controls inside a component.

images/aac29.png
Controls arranged in an absolute layout container.

Initially a number of controls are wrapped inside the 'AbsoluteLayout' container; which is a sub-type of the [Container] control defined in the 'Containers' menu. These controls are then positioned inside the absolute layout container using the 'Set Absolute Position and Size' editor. The positioning of controls in an absolute layout container is covered in the guide below and in this video.

Create an Absolute Container

  1. In the UX Builder on the UX Controls page open the 'Data Controls' menu. Click on the [TextBox] option to add a textbox control to the component. Give the textbox the name and label of 'firstname'.

    images/aac2.png
  2. Add five more [TextBox] controls to the component. Name and label these controls 'lastname', 'address', 'city', 'state', and 'zip'.

    images/aac3.png
  3. Highlight all of the textbox controls. Open the 'Containers' menu and click on the [Container] option.

    images/aac4.png
  4. From the Container Type list select the 'AbsoluteLayout' option and click 'Insert Around'

    images/aac5.png
  5. The controls tree:

    images/aac6.png

Add Controls to the Absolute Container

  1. Highlight the opening tag for the AbsoluteLayout container, "[AbsoluteLayout: ABSOLUTELAYOUT_1]".

    images/aac7.png
  2. In the properties list on the right, in the 'Container Begin Properties' section, click the [...] button next to the 'Absolute positions for controls' property. The 'Set Absolute Position and Size' editor will open.

    images/aac8.png
  3. There should be a dotted rectangle inside the 'Set Absolute Position and Size' editor's middle panel. This represents the size of the 'AbsoluteLayout' container as it will appear when the component is run.

    images/aac9.png
  4. Use the grey triangle in the lower right-hand corner of this dotted line to make the absolute layout container larger.

    images/aac10.png
  5. In the fields list in the top left corner highlight the 'firstname' field.

    images/aac11.png
  6. Place the mouse cursor inside the dotted line representing the absolute layout container. Hold down the left mouse button, and drag out a rectangle. Drag the rectangle until it is the size that you want the firstname textbox control to appear.

    images/aac12.png
  7. Release the left mouse button to drop the rectangle. The 'lastname' textbox control should automatically become highlighted. Drag out a second box to add the lastname textbox to the 'Absolute Layout' container.

    images/aac13.png
  8. Place the remaining controls inside the absolute layout container. Click OK to return to the UX Controls page.

    images/aac14.png
  9. Run the component in Live Preview. The controls should appear just as they did inside the 'Set Absolute Position and Size' editor.

    images/aac15.png

Align the Textbox Controls in the Container

  1. Go back to the Design pane and re-open the UX Controls page. Highlight the opening AbsoluteLayout container tab and the click the [...] button next to the 'Absolute positions for controls' property.

    images/aac16.png
  2. The 'Set Absolute Position and Size' editor will open. Hold down the 'Shift' key on your keyboard and, with the left mouse button, click on each of the textbox controls in the editor's layout panel.

    images/aac17.png
  3. Click the Edit Selected dropdown button. Select the 'Match Height' option from the list and then the 'First Selected' option.

    images/aac18.png
  4. To create a uniform width for controls in the container you can click on the border of a given control, hold down the left mouse button, and then move the control border into place. Blue vertical and horizontal guide-lines will illustrate when controls are aligned.

    images/aac19.png
  5. To undo or redo an edit to the layout, utilize the undo and redo options. Click OK to close the editor

    images/aac20.png
  6. Run the component in Live Preview. The controls should now be aligned.

    images/aac21.png

Add Watermarks to the Controls

  1. In the Design tab open the UX Controls page again. Highlight the 'firstname' textbox control in the controls tree.

    images/aac22.png
  2. In the properties list on the right scroll down to the 'Textbox Properties' section. Check the 'Watermark' property checkbox.

    images/aac23.png
  3. Leave the 'Watermark text' property set to <FieldLabel>. This is the placeholder for the textbox control's label.

    images/aac24.png
  4. Highlight the 'Watermark' property.

    images/aac25.png
  5. In the UX Controls page toolbar click the 'Paste property value' icon.

    images/aac26.png
  6. Highlight all of the controls and click OK to set the 'Watermark' property for all of the controls to true. Click the 'Set Properties' button to return to the Controls page.

    images/aac27.png
  7. Run the component in Live Preview. Now each one of the textbox controls should contain a watermark with the field label for that control.

    images/aac28.png